//
//  CPNetwork.h
//  News
//
//  Created by chen on 15/3/24.
//  Copyright (c) 2015年 chen. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef enum {
    HTTPMethodGet = 1,
    HTTPMethodPost
} HTTPMethod;

typedef void (^Completion)(NSData *JSONData,  NSError *error) ;


@interface CPNetwork : NSObject


- (NSString *)queryString:(NSDictionary *)parames;

- (void)requestJSON:(NSString *)baseURLString  httpMethod:(HTTPMethod)method  parameter:(NSDictionary *)parameter completionHandler:(Completion)completionHandler;

@end
